/* $Id$ */
package org.crazydays.gameplan.db.event;


import java.awt.event.ActionEvent;

import org.junit.*;

import static org.easymock.EasyMock.*;
import static org.easymock.classextension.EasyMock.*;

import org.crazydays.gameplan.Controller;

/**
 * OpenDatabaseUnitTest
 */
public class OpenDatabaseUnitTest
{
    /**
     * Test actionPerformed(ActionEvent).
     */
    @Test
    public void testActionPerformed()
    {
        // mocks
        Controller controller = createMock(Controller.class);
        ActionEvent event = createMock(ActionEvent.class);

        // expect
        controller.openDatabase();

        // replay
        replay(controller, event);

        // setup
        OpenDatabase action = new OpenDatabase(controller);

        // test
        action.actionPerformed(event);

        // verify
        verify(controller, event);
    }
}
